package com.blog.domain;

import java.util.Map;

public class ArticleTag extends POJO {

	private static final long serialVersionUID = 789724834632977022L;

	// �ֶ�
	protected long tagid;
	protected long aid;

	@Override
	protected String getTable() {
		return "articletag";
	}

	@Override
	protected String primaryKey() {
		return "tagid,aid";
	}

	@Override
	protected Object[] primaryVals() {
		return new Object[]{tagid,aid};
	}
	
	@Override
	protected Map<String, Object> listFields() {
		Map<String, Object> fields = super.listFields();
		fields.remove("tag");
		return fields;
	}

	public Tag getTag(){
		Tag t = new Tag();
		t.set_id(tagid);
		return (Tag)t.get();
	}

	public void setTagid(long tagid) {
		this.tagid = tagid;
	}

	public void setAid(long aid) {
		this.aid = aid;
	}

	public long getAid() {
		return aid;
	}

	public long getTagid() {
		return tagid;
	}
}
